package com.molyfun.parents.rest.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.molyfun.parents.activity.course.bean.CourseMediaBean;
import com.molyfun.parents.rest.BaseResponse;

import java.util.List;

/**
 * Created by william(liuchao.hit@gmail.com).
 * Date:10/31/16.
 */
public class HomeWorkResponse extends BaseResponse {

    private HomeWorkBeanList data;

    public HomeWorkBeanList getData(){
        return data;
    }

    public static class HomeWorkBeanList {

        private int offset;
        private int limit;
        private int total;
        private int size;
        private int pages;
        private int current;
        private boolean searchCount;
        private List<HomeWorkBean> records;
        private Object orderByField;
        private boolean asc;
        private int offsetCurrent;

        public int getOffset() {
            return offset;
        }

        public void setOffset(int offset) {
            this.offset = offset;
        }

        public int getLimit() {
            return limit;
        }

        public void setLimit(int limit) {
            this.limit = limit;
        }

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }

        public int getSize() {
            return size;
        }

        public void setSize(int size) {
            this.size = size;
        }

        public int getPages() {
            return pages;
        }

        public void setPages(int pages) {
            this.pages = pages;
        }

        public int getCurrent() {
            return current;
        }

        public void setCurrent(int current) {
            this.current = current;
        }

        public boolean isSearchCount() {
            return searchCount;
        }

        public void setSearchCount(boolean searchCount) {
            this.searchCount = searchCount;
        }

        public List<HomeWorkBean> getRecords() {
            return records;
        }

        public void setRecords(List<HomeWorkBean> records) {
            this.records = records;
        }

        public Object getOrderByField() {
            return orderByField;
        }

        public void setOrderByField(Object orderByField) {
            this.orderByField = orderByField;
        }

        public boolean isAsc() {
            return asc;
        }

        public void setAsc(boolean asc) {
            this.asc = asc;
        }

        public int getOffsetCurrent() {
            return offsetCurrent;
        }

        public void setOffsetCurrent(int offsetCurrent) {
            this.offsetCurrent = offsetCurrent;
        }
    }


    public static class HomeWorkBean implements Parcelable {

        /**
         * id : 402883ad5809bdef015809be21480000
         * name : 作业555555555
         * content : 内容内5555555555555555
         * comment : 今天完成的很好哦
         * createdatetime : 1477632268000
         * result : 4028839e5808d0b101580a2d09f70006
         * resultlist : [{"id":"4028839e5808d0b101580a2ced190004","typename":"P+","isselected":false},{"id":"4028839e5808d0b101580a2d09f70006","typename":"P","isselected":true},{"id":"4028839e5808d0b101580a2d2cff0008","typename":"P-","isselected":false}]
         * mediaobjectlist : [{"url":"http://oa91iwip0.bkt.clouddn.com/b.jpg?imageMogr2/thumbnail/300x300","type":null,"bigurl":"http://oa91iwip0.bkt.clouddn.com/b.jpg?imageMogr2/thumbnail/100x100","smallurl":"http://oa91iwip0.bkt.clouddn.com/b.jpg?imageMogr2/thumbnail/1280x1280"},{"url":"http://oa91iwip0.bkt.clouddn.com/a.jpg?imageMogr2/thumbnail/300x300","type":null,"bigurl":"http://oa91iwip0.bkt.clouddn.com/a.jpg?imageMogr2/thumbnail/100x100","smallurl":"http://oa91iwip0.bkt.clouddn.com/a.jpg?imageMogr2/thumbnail/1280x1280"}]
         */

        private String id;
        private String name;
        private String content;
        private String comment;
        private long createdatetime;
        private String status;//老师已读未读状态
        private String result;
        /**
         * id : 4028839e5808d0b101580a2ced190004
         * typename : P+
         * isselected : false
         */

        private List<ResultlistBean> resultlist;
        /**
         * url : http://oa91iwip0.bkt.clouddn.com/b.jpg?imageMogr2/thumbnail/300x300
         * type : null
         * bigurl : http://oa91iwip0.bkt.clouddn.com/b.jpg?imageMogr2/thumbnail/100x100
         * smallurl : http://oa91iwip0.bkt.clouddn.com/b.jpg?imageMogr2/thumbnail/1280x1280
         */

        private List<MediaobjectlistBean> mediaobjectlist;

        private List<CourseMediaBean> gallerymediaobjectlist;

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        public long getCreatedatetime() {
            return createdatetime;
        }

        public void setCreatedatetime(long createdatetime) {
            this.createdatetime = createdatetime;
        }

        public String getResult() {
            return result;
        }

        public void setResult(String result) {
            this.result = result;
        }

        public List<ResultlistBean> getResultlist() {
            return resultlist;
        }

        public void setResultlist(List<ResultlistBean> resultlist) {
            this.resultlist = resultlist;
        }

        public List<MediaobjectlistBean> getMediaobjectlist() {
            return mediaobjectlist;
        }

        public void setMediaobjectlist(List<MediaobjectlistBean> mediaobjectlist) {
            this.mediaobjectlist = mediaobjectlist;
        }

        public List<CourseMediaBean> getGallerymediaobjectlist() {
            return gallerymediaobjectlist;
        }

        public void setGallerymediaobjectlist(List<CourseMediaBean> gallerymediaobjectlist) {
            this.gallerymediaobjectlist = gallerymediaobjectlist;
        }


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.name);
            dest.writeString(this.content);
            dest.writeString(this.comment);
            dest.writeLong(this.createdatetime);
            dest.writeString(this.status);
            dest.writeString(this.result);
            dest.writeTypedList(this.resultlist);
            dest.writeTypedList(this.mediaobjectlist);
            dest.writeTypedList(this.gallerymediaobjectlist);
        }

        public HomeWorkBean() {
        }

        protected HomeWorkBean(Parcel in) {
            this.id = in.readString();
            this.name = in.readString();
            this.content = in.readString();
            this.comment = in.readString();
            this.createdatetime = in.readLong();
            this.status = in.readString();
            this.result = in.readString();
            this.resultlist = in.createTypedArrayList(ResultlistBean.CREATOR);
            this.mediaobjectlist = in.createTypedArrayList(MediaobjectlistBean.CREATOR);
            this.gallerymediaobjectlist = in.createTypedArrayList(CourseMediaBean.CREATOR);
        }

        public static final Parcelable.Creator<HomeWorkBean> CREATOR = new Parcelable.Creator<HomeWorkBean>() {
            @Override
            public HomeWorkBean createFromParcel(Parcel source) {
                return new HomeWorkBean(source);
            }

            @Override
            public HomeWorkBean[] newArray(int size) {
                return new HomeWorkBean[size];
            }
        };
    }

}
